@extends('admin.public.admin');
@section('main')
<div class="mws-panel grid_8">
                    <div class="mws-panel-header">
                        <span><i class="icon-ok"></i> 添加广告 </span>
                    </div>
                    <div class="mws-panel-body no-padding">
                        <form id="mws-validate" enctype="multipart/form-data" method="post" class="mws-form" action="/admin/sys/typeads" novalidate="novalidate">
                        {{csrf_field()}}
                            <div id="mws-validate-error" class="mws-form-message error" style="display:none;"></div>
                            <div class="mws-form-inline">
                                 <div class="mws-form-row">
                                    <label class="mws-form-label">选择分类</label>
                                 <div class="mws-form-item">
                                        <select class="required large" name="tid">
                                        <option value="999">请选择</option>
                                        @foreach($data as $k=>$v)
                                        <option value="{{$v['id']}}">{{$v['typename']}}</option>}

                                        @endforeach
                                        </select>
                                    </div>
                                </div>
                                <div class="mws-form-row">
                                    <label class="mws-form-label">广告标题</label>
                                    <div class="mws-form-item">
                                        <input type="text" name="title" class="required large">
                                    </div>
                                </div>
                                <div class="mws-form-row">
                                    <label class="mws-form-label">广告链接</label>
                                    <div class="mws-form-item">
                                        <input type="text" name="href" class="required email large">
                                    </div>
                                </div>
                                <div class="mws-form-row">
                                    <label class="mws-form-label">是否大图</label>
                                <ul class="mws-form-list">
                                            <li><input type="radio" value="0" checked name="type"> <label>小图</label></li>
                                            <li><input type="radio" value="1" name="type"> <label>大图</label></li>
                                        </ul>
                                        </div>
                                </div>
                                <div class="mws-form-row">
                                    <label class="mws-form-label">广告排序</label>
                                    <div class="mws-form-item">
                                        <input type="number" name="sort" class="required url large">
                                    </div>
                                </div>
                                     <div class="mws-form-row">
                                         <label class="mws-form-label">图片</label>
                                          <div class="mws-form-item">
                                            <input type="file"  name="img">
                                           </div>
                                  </div>
                            <div class="mws-button-row">
                                <input type="submit" value="提交" class="btn btn-danger">
                            </div>
                        </form>
                    </div>
                </div>
@endsection